home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Daemon
/
Unnamed1
/
40beta
/
MPPatch.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-12
|
21KB
|
913 lines
#include "MP.h"
#include <graphics/videocontrol.h>
void CatchDNode(ULONG list,UBYTE *Name);
//void PrintTags(struct TagItem *tags);
//UBYTE *FindTagSting(ULONG ID);
void CloneTextAttr(struct TTextAttr *Source, struct TTextAttr *Dest);
extern struct MPSem MPSem;
extern CxObj *Broker;
extern struct MsgPort *BrokerPort;
extern STRPTR MiscText[];
extern BOOL V39;
extern BYTE PublicSignal;
extern struct Process *MPTask;
extern UWORD NumDriPens;
extern defaultpens[];
extern struct MsgPort *CatchPort;
extern struct Screen ASM *(*OldOpenScreen)(REG __a0 struct NewScreen *,REG __a6 struct IntuitionBase *);
extern struct Screen ASM *(*OldOpenScreenTagList)(REG __a0 struct ExtNewScreen *ns,
REG __a1 struct TagItem *taglist,
REG __a6 struct IntuitionBase * );
extern BOOL ASM (*OldCloseScreen)(REG __a0 struct Screen *,REG __a6 struct IntuitionBase *);
extern struct Window ASM *(*OldOpenWindow)(REG __a0 struct NewWindow *nw,
REG __a6 struct IntuitionBase *lib);
extern struct Window ASM *(*OldOpenWindowTagList)(REG __a0 struct NewWindow *nw,
REG __a1 struct TagItem *tags,
REG __a6 struct IntuitionBase *lib);
extern BOOL ASM *(*OldLayoutMenusA)(REG __a0 struct Menu *fm,
REG __a1 APTR vi,
REG __a2 struct TagItem *tags,
REG __a6 struct Library *lib);
struct Screen ASM __saveds *NewOpenScreen(REG __a0 struct ExtNewScreen *ns)
{
return(NewOpenScreenTagList(ns,NULL));
}
struct DimensionInfo diminfo;
struct DisplayInfo dispinfo;
UBYTE *Topaz="topaz.font";
struct Screen *scr;
struct TextFont *textfont;
struct ScreenModeRequester *sr;
WORD width,
height,
depth;
BOOL dodepth;
LONG autoscroll,
look3d,
modeid,
overscan,
interleave,
wbscr;
//likewb;
BOOL changed,modechanged;
WORD pens[]={~0},
*screenpens;
struct Task *task;
struct DefaultNode *n;
struct TagItem ti[21],
*tag;
struct TagItem fonttags[]=
{
TA_DeviceDPI,(1<<16) | 1,TAG_DONE,0
};
ULONG l,ehbham;
struct TextAttr *storedfont;
UBYTE cliname[41],*taskname;
UBYTE *title;
struct OpenNode *ON;
LONG custombm;
struct Screen ASM __saveds *NewOpenScreenTagList(REG __a0 struct ExtNewScreen *ns,
REG __a1 struct TagItem *taglist)
{
ObtainSemaphoreShared(&MPSem.ListSem);
ObtainSemaphore(&MPSem.NodeSem);
/* Now that we've got the semaphore all globals are mine */
/* initialize everything */
title=NULL;
ON=NULL; //likewb=0;
custombm=changed=modechanged=depth=look3d=overscan=interleave=0L;
dodepth=FALSE;
wbscr=0;
width=height=autoscroll=modeid=-1;
screenpens=pens;
task=FindTask(0);
taskname=task->tc_Node.ln_Name;
if(GetProgramName(cliname,40)) /* Get cli program's name */
if(cliname[0]!=0) /* make sure cliname contains something */
taskname=cliname;
/* Initialization Done */
/**** Extract screen info from ns and taglist ****/
if(ns)
{
storedfont=ns->Font;
width =ns->Width;
height =ns->Height;
modeid =ns->ViewModes;
depth =ns->Depth;
title =ns->DefaultTitle;
custombm =ns->Type & CUSTOMBITMAP;
if(ns->Type & NS_EXTENDED)
taglist=ns->Extension;
}
if(taglist)
{
//likewb=(ULONG)FindTagItem(SA_LikeWorkbench,taglist);
//printf("\n---------\n");
//PrintTags(taglist);
custombm =GetTagData(SA_BitMap, custombm,taglist);
width =GetTagData(SA_Width, width, taglist);
height =GetTagData(SA_Height, height, taglist);
autoscroll=GetTagData(SA_AutoScroll,autoscroll,taglist);
overscan =GetTagData(SA_Overscan, overscan,taglist);
modeid =GetTagData(SA_DisplayID, modeid, taglist);
depth =GetTagData(SA_Depth, depth, taglist);
title =(UBYTE *)GetTagData(SA_Title,(ULONG)title,taglist);
wbscr =(GetTagData(SA_Type,0,taglist) & 15) == WBENCHSCREEN;
interleave=GetTagData(SA_Interleaved,interleave,taglist);
if(tag=FindTagItem(SA_Overscan,taglist))
if(!FindTagItem(SA_DClip,taglist))
overscan=tag->ti_Data;
if(tag=FindTagItem(SA_Pens,taglist))
{
screenpens=(UWORD *)(tag->ti_Data);
//look3d=TRUE;
}
//printf("TagList w=%4d h=%4d id=%8x d=%4d t=%s\n",width,height,modeid,depth,title);
}
n=NULL;
// printf("\nOld Tags:\n");
// PrintTags(taglist);
if(!title) title=GetString(MSG_ITEM_NO_NAME); /* Just in case ther isn't a title */
if(!(n=FindDNode(&MPSem.PromotionList[1],title)))
if(!(n=FindDNode(&MPSem.PromotionList[0],taskname)))
{
if(MPSem.CatchPrograms && taskname) //Catch new names only.
CatchDNode(0,taskname);
if(MPSem.CatchScreens) CatchDNode(1,title);
}
if(!MPSem.Enabled || !n || wbscr)
{
scr=OldOpenScreenTagList(ns,taglist,IntuitionBase);
ReleaseSemaphore(&MPSem.ListSem);
ReleaseSemaphore(&MPSem.NodeSem);
return(scr);
}
ehbham=modeid & (HAM_KEY | EXTRAHALFBRITE_KEY);
if(n)
{
look3d =n->Look3D;
interleave =(n->Flags & INTERLEAVE) | interleave;
screenpens =n->Pens;
switch(n->ModeSelect)
{
case 1:
if(modeid > -1)
{
modeid =(n->ModeID & MONITOR_ID_MASK) | (modeid & (~MONITOR_ID_MASK));
modechanged=TRUE;
}
case 0:
autoscroll =n->AutoScroll;
break;
case 2:
modeid =n->ModeID | ehbham;
overscan =n->OverscanType;
width =n->Width;
height =n->Height;
autoscroll =n->AutoScroll;
if(n->Flags & DEPTH)
{
depth=n->Depth;
dodepth=TRUE;
}
changed=TRUE;
break;
case 3:
if((sr=(struct ScreenModeRequester *)AllocAslRequestTags(ASL_ScreenModeRequest,
ASLSM_TitleText ,title,
ASLSM_DoWidth ,TRUE ,
ASLSM_DoHeight ,TRUE ,
ASLSM_DoOverscanType ,TRUE ,
ASLSM_DoAutoScroll ,TRUE ,
ASLSM_DoDepth ,n->Flags & DEPTH,
ASLSM_InitialAutoScroll ,n->AutoScroll,
ASLSM_InitialDisplayWidth ,n->Width,
ASLSM_InitialDisplayHeight ,n->Height,
ASLSM_InitialDisplayID ,n->ModeID,
ASLSM_InitialDisplayDepth ,n->Depth,
ASLSM_NegativeText ,GetString(MSG_REQ_USE_DEFAULT),
ASLSM_PropertyFlags ,0,
ASLSM_PropertyMask ,BADMODES,
TAG_END
)))
{
if(AslRequest(sr,NULL))
{
modeid =sr->sm_DisplayID | ehbham;
overscan =sr->sm_OverscanType;
width =sr->sm_DisplayWidth;
height =sr->sm_DisplayHeight;
changed=TRUE;
if(n->Flags & DEPTH)
{
depth=sr->sm_DisplayDepth;
dodepth=TRUE;
}
}
FreeAslRequest(sr);
}
break;
}/* end switch*/
}/* end if */
/**** Setup promoted taglist ****/
l=0;
if(changed && !(custombm))
{
ti[l].ti_Tag=SA_Width;
ti[l].ti_Data=width;
l++;
ti[l].ti_Tag=SA_Height;
ti[l].ti_Data=height;
l++;
ti[l].ti_Tag=SA_Overscan;
ti[l].ti_Data=overscan;
l++;
}
if(modechanged || changed)
{
ti[l].ti_Tag=SA_DisplayID;
ti[l].ti_Data=modeid;
l++;
}
if(look3d)
{
ti[l].ti_Tag=SA_Pens;
ti[l].ti_Data=(ULONG)screenpens;
l++;
if(depth==1)
{
depth=2;
dodepth=TRUE;
// ti[l].ti_Tag=SA_Depth;
// ti[l].ti_Data=2;
// l++;
}
}
if(autoscroll)
{
ti[l].ti_Tag=SA_AutoScroll;
ti[l].ti_Data=TRUE;
l++;
}
if(n->Flags & CENTER)
{
if(GetDisplayInfoData(NULL,(UBYTE *)&diminfo,sizeof(struct DimensionInfo),DTAG_DIMS,modeid))
{
if(width>-1)
{
ti[l].ti_Tag=SA_Left;
ti[l].ti_Data=((diminfo.Nominal.MaxX-diminfo.Nominal.MinX)-width)/2;
l++;
}
if(height>-1)
{
ti[l].ti_Tag=SA_Top;
ti[l].ti_Data=((diminfo.Nominal.MaxY-diminfo.Nominal.MinY)-height)/2;
l++;
}
}
}
switch(n->FontType)
{
case SFONT_SYS:
if(ns) ns->Font=0;
ti[l].ti_Tag=SA_SysFont;
ti[l].ti_Data=1;
l++;
break;
case SFONT_MP:
if(n->Font.tta_Name)
{
if(ON=AllocMem(sizeof(struct OpenNode),MEMF_CLEAR|MEMF_PUBLIC))
{
ON->Flags|=ON_FONT;
ti[l].ti_Tag =SA_Font;
ti[l].ti_Data =(ULONG)&ON->TA;
l++;
if(n->Flags & FIXASPECT && modeid != -1)
{
if(GetDisplayInfoData(NULL,(UBYTE *)&dispinfo,sizeof(struct DisplayInfo),DTAG_DISP,modeid))
{
fonttags[0].ti_Data=(ULONG)dispinfo.Resolution.x|(((ULONG)dispinfo.Resolution.y)<<16);
n->Font.tta_Style |= FSF_TAGGED;
n->Font.tta_Tags =fonttags;
}
}
CloneTextAttr(&n->Font,&ON->TA);
n->Font.tta_Style &= (~FSF_TAGGED);
n->Font.tta_Tags=NULL;
}
}
break;
}
if(n->PubOptions==1)
{
ULONG error=FALSE;
struct TagItem badtags[]=
{
SA_BitMap, 1<<0,
// SA_PubName, 1<<1,
SA_PubSig, 1<<2,
SA_PubTask, 1<<3,
SA_BackFill, 1<<4,
TAG_DONE, 0
};
if(taglist) error =PackBoolTags(0,taglist,badtags);
if(ns) error|=(ns->Type & CUSTOMBITMAP);
if(error==0)
{
if(!ON) ON=AllocMem(sizeof(struct OpenNode),MEMF_CLEAR|MEMF_PUBLIC);
if(ON)
{
struct OpenNode *won;
UBYTE number[8];
ULONG cnt=1,len;
strncpy(ON->PubName,n->PubName,MAXPUBSCREENNAME);
ON->PubName[MAXPUBSCREENNAME]=0;
len=strlen(ON->PubName);
len=min(len,MAXPUBSCREENNAME-9);
won=(struct OpenNode *)MPSem.OpenList.lh_Head;
while(won->on_Node.ln_Succ)
{
if(cnt > 1)
{
number[0]='.';
stci_d(&number[1],cnt);
ON->PubName[len]=0;
strncat(ON->PubName,number,MAXPUBSCREENNAME);
ON->PubName[MAXPUBSCREENNAME]=0;
}
if(0==strcmp(ON->PubName,won->PubName))
{
won=(struct OpenNode *)MPSem.OpenList.lh_Head;
cnt++;
}
else
won=(struct OpenNode *)won->on_Node.ln_Succ;
}
ON->PubName[MAXPUBSCREENNAME]=0;
ON->Flags|=ON_PUBLIC|ON_OPEN;
ti[l].ti_Tag=SA_Title;
ti[l].ti_Data=(ULONG)ON->PubName;
l++;
ti[l].ti_Tag=SA_PubName;
ti[l].ti_Data=(ULONG)ON->PubName;
l++;
ti[l].ti_Tag=SA_PubSig;
ti[l].ti_Data=PublicSignal;
l++;
ti[l].ti_Tag=SA_PubTask;
ti[l].ti_Data=(ULONG)MPTask;
l++;
if(!(ON->Flags & ON_FONT))
{
struct TTextAttr *ot=NULL;
if(ns) ot=(struct TTextAttr *)ns->Font;
ot=(struct TTextAttr *)GetTagData(SA_Font,(ULONG)ot,taglist);
if(ot)
{
ON->Flags|=ON_FONT;
CloneTextAttr(ot,&ON->TA);
ti[l].ti_Tag =SA_Font;
ti[l].ti_Data=(ULONG)&ON->TA;
l++;
}
}
}
}
}
if(n->Flags & SCRHOTKEY)
{
if(!ON) ON=AllocMem(sizeof(struct OpenNode),MEMF_CLEAR|MEMF_PUBLIC);
if(ON)
{
if(ON->HotKey=AllocVec(strlen(n->HotKey)+1,MEMF_CLEAR|MEMF_PUBLIC))
{
strcpy(ON->HotKey,n->HotKey);
ON->Cx=AddHotKey(Broker,BrokerPort,ON->HotKey,(ULONG)ON);
}
}
}
if(n->Flags & SHAREPENS)
{
ti[l].ti_Tag=SA_SharePens;
ti[l].ti_Data=TRUE;
l++;
}
if(dodepth && !(custombm) && !(ehbham))
{
ti[l].ti_Tag=SA_Depth;
ti[l].ti_Data=depth;
l++;
}
if(interleave && !(custombm))
{
ti[l].ti_Tag=SA_Interleaved;
ti[l].ti_Data=TRUE;
l++;
}
ti[l].ti_Tag=SA_MinimizeISG; /*** just a little extra for v40 ***/
ti[l].ti_Data=TRUE;
l++;
if(taglist)
{
ti[l].ti_Tag=TAG_MORE;
ti[l].ti_Data=(ULONG)taglist;
}
else
{
ti[l].ti_Tag=TAG_DONE;
ti[l].ti_Data=0;
}
/**** End Setup taglist ****/
// printf("\nNew Tags:\n");
// PrintTags(ti);
if(ON)
{
if(ON->Flags & ON_FONT)
textfont=OpenDiskFont((struct TextAttr *)&ON->TA);
}
scr=OldOpenScreenTagList(ns,ti,IntuitionBase);
if(scr && n->Flags & SHAREPENS && n->LockedPens && V39)
{
UBYTE *str,state=0,done=FALSE;
WORD num=0,num1=0,num2;
struct ColorMap *cm;
cm=scr->ViewPort.ColorMap;
str=n->LockedPens;
while(!done)
{
if(!*str) done=TRUE;
if(*str>='0' && *str<='9')
{
if(state==0)
state=1;
num=0;
while(*str>='0' && *str<='9')
{
num*=10;
num+=*str - '0';
str++;
}
switch(state)
{
case 1:
// printf("obtaining %d\n",num);
ObtainPen(cm,num,0,0,0, PEN_EXCLUSIVE | PEN_NO_SETCOLOR);
break;
case 2:
for(num2=num1+1;num2<=num;num2++)
{
// printf("obtaining %d\n",num2);
ObtainPen(cm,num2,0,0,0, PEN_EXCLUSIVE | PEN_NO_SETCOLOR);
}
break;
}
state=0;
}
if(*str==' ')
for(;*str==' ';str++);
else
if(*str=='-')
{
num1=num;
state=2;
str++;
}
else
str++;
}
}
if(ON)
{
if(ON->Flags & ON_FONT)
if(textfont)
CloseFont(textfont);
if(scr)
{
ON->Screen=scr;
if(ON->Flags & ON_PUBLIC)
{
if(n->PubOptions == 1)
{
PubScreenStatus(scr,0);
}
}
AddHead(&MPSem.OpenList,(struct Node *)ON);
}
else
FreeOpenNode(ON);
}
/*
if(scr)
{
VideoControlTags(scr->ViewPort.ColorMap,
VTAG_BORDERSPRITE_SET,TRUE,
TAG_DONE);
}
*/
if(ns) ns->Font=storedfont;
if(!scr) scr=OldOpenScreenTagList((struct ExtNewScreen *)ns,taglist,IntuitionBase);
ReleaseSemaphore(&MPSem.ListSem);
ReleaseSemaphore(&MPSem.NodeSem);
return(scr);
}
BOOL __saveds ASM NewCloseScreen(REG __a0 struct Screen *S)
{
struct OpenNode *on;
BOOL rv,ok=FALSE;
ULONG pub=0;
ObtainSemaphore(&MPSem.OpenListSem);
on=(struct OpenNode *)MPSem.OpenList.lh_Head;
while(on->on_Node.ln_Succ)
{
if(on->Screen==S)
{
Remove((struct Node *)on);
pub=on->Flags & ON_PUBLIC;
ok=TRUE;
break;
}
on=(struct OpenNode *)on->on_Node.ln_Succ;
}
if(!ok) on=NULL;
if(!pub)
{
if(rv=OldCloseScreen(S,IntuitionBase))
FreeOpenNode(on);
else
if(on)
AddHead(&MPSem.OpenList,(struct Node *)on);
}
else // Public
{
on->Flags&=(~ON_OPEN);
S->DefaultTitle=S->Title=on->PubName;
ShowTitle(S,TRUE);
AddHead(&MPSem.OpenList,(struct Node *)on);
rv=TRUE;
Signal((struct Task *)MPTask,1<<PublicSignal);
}
ReleaseSemaphore(&MPSem.OpenListSem);
return(rv);
}
void FreeOpenNode(struct OpenNode *on)
{
if(on)
{
//if(on->TA.tta_Name)
FreeVec(on->TA.tta_Name);
//if(on->TA.tta_Tags)
FreeVec(on->TA.tta_Tags);
//if(on->Cx)
DeleteCxObjAll(on->Cx);
FreeVec(on->HotKey);
FreeMem(on,sizeof(struct OpenNode));
}
}
struct Window __saveds ASM *NewOpenWindow(REG __a0 struct NewWindow *nw)
{
return(NewOpenWindowTagList(nw,NULL));
}
struct Window __saveds ASM *NewOpenWindowTagList(REG __a0 struct NewWindow *nw,
REG __a1 struct TagItem *tags)
{
struct Window *w;
struct TagItem ti[]={WA_NewLookMenus , TRUE ,
TAG_DONE , 0};
// ObtainSemaphoreShared(&MPSem.ListSem);
if(MPSem.EnabledNLM)
{
if(tags)
{
ti[1].ti_Tag =TAG_MORE;
ti[1].ti_Data=(ULONG)tags;
}
w=(struct Window *)OldOpenWindowTagList(nw,ti,IntuitionBase);
}
else
w=(struct Window *)OldOpenWindowTagList(nw,tags,IntuitionBase);
// ReleaseSemaphore(&MPSem.ListSem);
return(w);
}
BOOL __saveds ASM NewLayoutMenusA(REG __a0 struct Menu *fm,
REG __a1 APTR vi,
REG __a2 struct TagItem *tags)
{
BOOL rv;
struct TagItem ti[2]=
{
GTMN_NewLookMenus,TRUE,
TAG_DONE,0
};
// ObtainSemaphoreShared(&MPSem.ListSem);
if(MPSem.EnabledNLM)
{
if(tags)
{
ti[1].ti_Tag=TAG_MORE;
ti[1].ti_Data=(ULONG)tags;
}
rv=(BOOL)OldLayoutMenusA(fm,vi,ti,GadToolsBase);
}
else
rv=(BOOL)OldLayoutMenusA(fm,vi,tags,GadToolsBase);
// ReleaseSemaphore(&MPSem.ListSem);
return(rv);
}
void CatchDNode(ULONG dest, UBYTE *Name)
{
struct DefaultNode *dnode;
LONG l;
if(dnode=AllocVec(sizeof(struct DefaultNode),MEMF_CLEAR|MEMF_PUBLIC))
{
if(dnode->Def_Node.ln_Name=AllocVec(strlen(Name)+1,MEMF_CLEAR|MEMF_PUBLIC))
{
strcpy(dnode->Def_Node.ln_Name,Name);
dnode->Type =dest;
dnode->Width =width;
dnode->Height =height;
dnode->AutoScroll =autoscroll;
dnode->ModeSelect =0;
dnode->ModeID =modeid;
dnode->OverscanType =overscan;
dnode->Look3D =look3d;
dnode->Flags =0;
dnode->Depth =depth;
if(interleave)
dnode->Flags|=INTERLEAVE;
l=0;
if(screenpens)
for(;l<NumDriPens && screenpens[l]!=(~0);l++)
dnode->Pens[l]=screenpens[l];
for(;l<NumDriPens;l++)
dnode->Pens[l]=defaultpens[l];
PutMsg(CatchPort,(struct Message *)dnode);
return;
}
FreeVec(dnode);
}
}
/*
void PrintTags(struct TagItem *tags)
{
struct TagItem *ti;
while(ti=NextTagItem(&tags))
{
printf("%s %10u\n",FindTagSting(ti->ti_Tag),ti->ti_Data);
}
}
ULONG TagID[]=
{
SA_Left,
SA_Top,
SA_Width,
SA_Height,
SA_Depth,
SA_DetailPen,
SA_BlockPen,
SA_Title,
SA_Colors,
SA_ErrorCode,
SA_Font,
SA_SysFont,
SA_Type,
SA_BitMap,
SA_PubName,
SA_PubSig,
SA_PubTask,
SA_DisplayID,
SA_DClip,
SA_Overscan,
SA_Obsolete1,
SA_ShowTitle,
SA_Behind,
SA_Quiet,
SA_AutoScroll,
SA_Pens,
SA_FullPalette,
SA_ColorMapEntries,
SA_Parent,
SA_Draggable,
SA_Exclusive,
SA_SharePens,
SA_BackFill,
SA_Interleaved,
SA_Colors32,
SA_VideoControl,
SA_FrontChild,
SA_BackChild,
SA_LikeWorkbench,
SA_Reserved,
SA_MinimizeISG,
0xffffffff,
};
UBYTE *TagStrings[]=
{
"SA_Left",
"SA_Top",
"SA_Width",
"SA_Height",
"SA_Depth",
"SA_DetailPen",
"SA_BlockPen",
"SA_Title",
"SA_Colors",
"SA_ErrorCode",
"SA_Font",
"SA_SysFont",
"SA_Type",
"SA_BitMap",
"SA_PubName",
"SA_PubSig",
"SA_PubTask",
"SA_DisplayID",
"SA_DClip",
"SA_Overscan",
"SA_Obsolete1",
"SA_ShowTitle",
"SA_Behind",
"SA_Quiet",
"SA_AutoScroll",
"SA_Pens",
"SA_FullPalette",
"SA_ColorMapEntries",
"SA_Parent",
"SA_Draggable",
"SA_Exclusive",
"SA_SharePens",
"SA_BackFill",
"SA_Interleaved",
"SA_Colors32",
"SA_VideoControl",
"SA_FrontChild",
"SA_BackChild",
"SA_LikeWorkbench",
"SA_Reserved",
"SA_MinimizeISG",
"Unknown Tag"
};
UBYTE *FindTagSting(ULONG id)
{
ULONG l;
for(l=0;;l++)
{
if(TagID[l]==id || TagID[l]==0xffffffff)
return(TagStrings[l]);
}
return(TagStrings[l]);
}
*/
void CloneTextAttr(struct TTextAttr *Source, struct TTextAttr *Dest)
{
CopyMem(Source,Dest,sizeof(struct TextAttr));
if(Dest->tta_Name=AllocVec(strlen(Source->tta_Name)+1,MEMF_CLEAR|MEMF_PUBLIC))
{
strcpy(Dest->tta_Name,Source->tta_Name);
if(Dest->tta_Style & FSF_TAGGED)
{
if(!(Dest->tta_Tags=CloneTagItems(Source->tta_Tags)))
Dest->tta_Style &= (~FSF_TAGGED);
}
}
else
{
Dest->tta_Name=Topaz;
Dest->tta_YSize=8;
Dest->tta_Style=0;
Dest->tta_Flags=0;
}
}